<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
  <style>
    .box {
      width: 600px;
      background-color: aquamarine;
      border: 10px solid #ccc;
    }
    p {
      float: left;
      width: 60px;
      height: 50px;
      background-color: blueviolet;
      border: 1px solid #ccc;
    }
    .clearfix::before,.clearfix::after{
      content: "";
      display: table;
    }
    .clearfix::after{
      clear: both;
    }
    /* IE6、7专有 */
    .clearfix{
      *zoom: 1;
    }
  </style>
</head>
<body>
  <div class="box clearfix">
    <p>我是kiss</p>
    <p>我是kiss</p>
  </div>
</body>

</html>